#include <xen/dom0_ops.h>
#include <xen/event_channel.h>
#include <xen/sched_ctl.h>
-#include <xen/io/domain_controller.h>
- /* Obtain or relinquish a handle on the 'xc' library. */
+ /*\
+ * INITIALIZATION FUNCTIONS
+ \*/
+
+ /**
+ * This function opens a handle to the hypervisor interface. This function can
+ * be called multiple times within a single process. Multiple processes can
+ * have an open hypervisor interface at the same time.
+ *
+ * Each call to this function should have a corresponding call to
+ * xc_interface_close().
+ *
+ * This function can fail if the caller does not have superuser permission or
+ * if a Xen-enabled kernel is not currently running.
+ *
+ * @return a handle to the hypervisor interface or -1 on failure
+ */
int xc_interface_open(void);
+
+ /**
+ * This function closes an open hypervisor interface.
+ *
+ * This function can fail if the handle does not represent an open interface or
+ * if there were problems closing the interface.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @return 0 on success, -1 otherwise.
+ */
int xc_interface_close(int xc_handle);
+ /*\
+ * DOMAIN MANAGEMENT FUNCTIONS
+ \*/
+
typedef struct {
u32 domid;
unsigned int cpu;
u32 first_domid,
unsigned int max_doms,
xc_dominfo_t *info);
+
+ /**
+ * This function returns information about one domain. This information is
+ * more detailed than the information from xc_domain_getinfo().
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm domid the domain to get information from
+ * @parm info a pointer to an xc_domaininfo_t to store the domain information
+ * @parm ctxt a pointer to a structure to store the execution context of the
+ * domain
+ * @return 0 on success, -1 on failure
+ */
int xc_domain_getfullinfo(int xc_handle,
u32 domid,
+ u32 vcpu,
xc_domaininfo_t *info,
full_execution_context_t *ctxt);
int xc_domain_setcpuweight(int xc_handle,